package top.yueyazhui.vhr.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.yueyazhui.vhr.mapper.SalaryMapper;
import top.yueyazhui.vhr.model.Salary;

import java.util.List;

@Service
public class SalaryService {

    @Autowired
    SalaryMapper salaryMapper;

    public List<Salary> getAll() {
        return salaryMapper.getAll();
    }

    public Integer insert(Salary salary) {
        return salaryMapper.insertSelective(salary);
    }

    public Integer delete(Integer id) {
        return salaryMapper.deleteByPrimaryKey(id);
    }

    public Integer update(Salary salary) {
        return salaryMapper.updateByPrimaryKeySelective(salary);
    }
}
